<?php
 
require_once('../../../../wp-config.php');
require_once('../../../../wp-includes/functions.php');

global $table_prefix, $wpdb, $post;
$reports = $wpdb->prefix."reports";

$rname = $_REQUEST['rname'];
$rurl = $_REQUEST['rurl'];
$rcontent = $_REQUEST['rcontent'];
$postid = $_REQUEST['postid'];
$date=date("Y-m-d H:i:s");


$sql="INSERT INTO $reports (rname, postid, posturl, rcontent, time) VALUES ('" .$rname. "','".$postid. "','" .$rurl. "','" .$rcontent. "','". $date. "')";
$r = mysql_query($sql);
if($r)
{
	echo 1;    
}
else
{
	echo 0;
	
}
?>